package com.hynux.smartclass;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class SmartClass extends Activity implements OnClickListener{
    /** Called when the activity is first created. */
	private ImageView start_btn;
	private ImageView quiz_btn;
	private ImageView setup_btn;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        start_btn = (ImageView)findViewById(R.id.start_btn);
        quiz_btn = (ImageView)findViewById(R.id.quiz_btn);
        setup_btn = (ImageView)findViewById(R.id.setup_btn);
        
        start_btn.setOnClickListener(this);
        quiz_btn.setOnClickListener(this);
        setup_btn.setOnClickListener(this);
    }
    

	@Override
	public void onClick(View view) {
		if(view.getId()==R.id.start_btn){
			start_btn.setImageResource(R.drawable.class2);
			Intent i = new Intent(SmartClass.this,StartClass.class);
			startActivity(i);
		}
		if(view.getId()==R.id.quiz_btn){
			quiz_btn.setImageResource(R.drawable.quiz2);
			Intent i = new Intent(SmartClass.this,Quiz.class);
			startActivity(i);
		}
		if(view.getId()==R.id.setup_btn){
			setup_btn.setImageResource(R.drawable.setup2);
			Intent i = new Intent(SmartClass.this,Setup.class);
			startActivity(i);
		}
		
	}


	@Override
	protected void onResume() {
		super.onResume();
		
		start_btn.setImageResource(R.drawable.class1);
		quiz_btn.setImageResource(R.drawable.quiz);
		setup_btn.setImageResource(R.drawable.setup);
		
	}
}